﻿
using System;

namespace MathService.DSP.Fourier
{
    struct exp
    {
        public static exp[] GetCoefficients(int N, bool IsInverse = false)
        {
            var w = new exp[N];
            {
                var darg = Consts.pi2 / N;
                if(IsInverse) darg *= -1;
                var arg = 0.0;
                for(var i = 0; i < N; i++)
                {
                    w[i].sin = Math.Sin(arg);
                    w[i].cos = Math.Cos(arg);
                    arg += darg;
                }
                return w;
            }
        }

        public double sin;
        public double cos;
    }
}